<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%String path = request.getContextPath() ;%>
<%@ taglib uri="/WEB-INF/tld/c.tld" prefix="c" %> 
<%@ taglib uri="/WEB-INF/tld/ui.tld" prefix="ui" %> 
<!DOCTYPE html>
<html lang="zh-CN" >
<head>
<c:set var="ctx" value="${pageContext.request.contextPath}" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>竞拍结果</title> 
<jsp:include page="../../import.jsp" flush="true" />
</head>

<body class="iframeBody">
<div class="Wrapper">
<div style="text-align:center">
	<div id="ligergrid" class="sq-grid"></div>
</div>
</div>
<script type="text/javascript">
	var grid = null;
	var id = '${id}';
	$(function () {
		var _url = '<%=path%>/auccar/aucCarQuo/initList.do?id='+id;
	    $("#ligergrid").ligerGrid({
	    	url: _url,
	    	method : 'get',
	        columns: [
	            { display: '竞拍金额',align:'center', name: 'quoPc', width: '25%',
	            	render: function (rowdata, rowindex, value){
	            		var h='';
	            		if(rowdata.isValid=='1'){
	            			h='<span style="color:green">'+(rowdata.quoPc/100).toFixed(2)+'</span>';
	            		}else{
	            			h='<span style="color:gray">'+(rowdata.quoPc/100).toFixed(2)+'</span>';
	            		}
	                	return h;
	            	}
	            },
	            { display: '商户名称', align:'left', width: '25%',
	            	render: function (rowdata, rowindex, value){
            		var h=rowdata.aucSplUsrVO.splNm;
                	return h;
            		}
	            },
	            { display: '联系电话',align:'center', width: '25%' ,
	            	render:function (rowdata, rowindex, value, column) {
	            		var h=rowdata.aucSplUsrVO.splTel;
	                	return h;
                	}
	            },
	            { display: '竞拍时间',align:'center', name: 'crtTm', width: '25%',render:renderDate  },
	        ],
	        pageSize:10,
	        root:'rows',
	        record:'total',
	        hideLoadButton : true,
	        width: '100%',
	        height:'100%',
	        heightDiff:-2,
	        rownumbers:true,
	    });
	    grid = liger.get("ligergrid");
	    grid.setHeight(100);
	});
	
	var callback = function () {
		grid.reload();
    };
    
	function iframeResize () {
	    if (parent.mainApp) {
	        parent.mainApp.parentTab.onResize();
	    };
	}
	
	//格式化时间
	function renderDate(rowdata, index, value){
		var dateStr = "";
		if(null != value){
			var date = new Date(value);
			dateStr = DateUtils.formatDate(date, DateUtils.YYYY_MM_DDHHMMSS);
		}
		return dateStr;
	}
	
</script>

</body>
</html>
